package com.link.base.base.common.service;

import com.link.base.base.common.model.Announce;
import com.link.core.basic.service.BasicService;

import java.util.List;

/**
 * Copyright  hande Company. All Rights Reserved.
 *
 * @author unknwon
 * @version 1.0
 * @date: 2018/11/8 19:28
 */

public interface AnnounceService extends BasicService<Announce> {

    /**
     * 查看指定用户能看到的开放公告列表
     *
     * @param entity
     * @param userId 用户ID
     * @return
     * @throws Exception
     */
    public List<Announce> queryPublicPage(Announce entity, Long userId) throws Exception;

    /**
     * 查看用户未阅读公告列表
     *
     * @param entity
     * @param userId 用户ID
     * @return
     * @throws Exception
     */
    public List<Announce> queryMyAnnouncePage(Announce entity, Long userId) throws Exception;


    /**
     * 发布公告
     *
     * @param record
     * @throws Exception
     */
    public void publish(Announce record) throws Exception;

    /**
     * 撤回公告
     *
     * @param record
     * @throws Exception
     */
    public void revoke(Announce record) throws Exception;

}
